# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=silc-client
pkgver=1.1.11
pkgrel=17
pkgdesc="Secure Internet Live Conferencing - client"
url="http://silcnet.org/"
arch="all"
license="GPL-2.0-only"
makedepends="file glib-dev openssl-dev>3 perl-dev ncurses-dev"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/project/silc/silc/client/sources/silc-client-$pkgver.tar.gz
	format-security.patch
	irssi-configure-gcc14.patch
	"

prepare() {
	default_prepare

	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--sysconfdir=/etc
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/lib/perl5/core_perl/perllocal.pod
}

sha512sums="
185cd687a155fbbfbb65877438c2ad099d6795451d443d4d826d47469d312fa9f82035999d1cdf80f24eac2df45a10e88ddf095dc5acda70a31c61a4abb1cdb2  silc-client-1.1.11.tar.gz
b4fee252d1bbd8ade5f89f16db95b156749b7d23ae730f9385e9ed11f92e2b38ad36d8a8e8e55aa87a65ac8a578c0d789f96d775bccc4037d8155ece892153ac  format-security.patch
0f64bd883ca0d5b610c217dee9570bb0eaa5895c2128de031fcde4c2dd75a537669b912146623919c9e5f95e5a1fbb8c4d5d95e92283d6e30878e298f8f90dbf  irssi-configure-gcc14.patch
"
